


%% Site MF1.04 (EMSL04); Black Rock     44 51.2N  123 31.6W   (40.0 km from coast)
% ===============================================================================
%  
% Site located in an open old logging cut with is relativelt flat in the EW
% direction but does have a gradient estimated at some 4 m over the NS dipole.
% Thus there will be topographic effects on the Ex data. The head was reasonably
% well buried but the system box was exposed.
% 24 July - 22 Sept. continuous.
% High quality data with few problems.
%  
% EMSL04 8507100209-8509221638 5 020  MT#11  Mag:34 Tell:50546 Datel:1031
% 'H' 0.10007   43.0   0.0          Mag:0.1000420   Datel:1.0003334
% 'D' 0.10003   46.5   0.0          Mag:0.1000000   Datel:1.0003334
% 'Z' 0.09994   42.5   0.0          Mag:0.0999300   Datel:1.0004447
% 'N' 0.10007   47.8   29694.9      Ex:100m  x100   Datel:1.0006671
% 'E' 0.10001   41.5   30203.4      Ey:100m  x100   Datel:1.0001111


% EMSL018509161300
%    26  615   53   93  195   21  615   53   97  195   24  617   56   93  187
%    24  620   56  102  184   24  625   58  102  176   26  634   63  115  161
% etc.
% where the Hx field at 13:00:20 is  2.6 nT
%           Hy                      61.5 nT
%           Hz                       5.3 nT
%           Ex                       9.3 mV/km
%           Ey                      19.5 mV/km

time_vec = [(20:20:3600)./(24*3600)]';% the data are strored in 180 records at 20 sec
fname  = 'E:\NoBackup\magtrans\EMSLAB\emsl04.asc';
fid = fopen(fname,'rt');
st=1;
en=180;
while feof(fid) ~= 1,
    
    A = fscanf(fid,'%s',1);
    Data = fscanf(fid,'%5d',180*5);
    TS.matrix(st:en,:) = reshape(Data,[5,180])'./10;
    start_time = datenum(A(7:end),'yymmddHHMM');
    TS.fday(st:en,:) = time_vec + start_time;
    
    st = en + 1;
    en = en + 180;
    
end;
   
fclose(fid);



%%Site MF2.13 (EMSL13); Lucky Butte    44 37.9N  122 09.2W  (146.3 km from coast)
% ===============================================================================
%  
% Site located within in small copse of bushes in saddle-like topography (expect
% topographic effects). Head reasonably well buried (2 feet of soil) and system
% box shaded).
% 24 July - 21 Sept. continuous.
% Excellent high quality data
%  
% EMSL13 8507150112-8507310235 5 020  MT#4  Mag:22 Tell:1329 Datel:MT-4
% 'H' 0.09999   48.5   0.0          Mag:0.0999660   Datel:1.0002222
% 'D' 0.10012   48.1   0.0          Mag:0.1000160   Datel:1.0010010
% 'Z' 0.09964   46.4   0.0          Mag:0.0995381   Datel:1.0010010
% 'N' 0.10537   46.7   29355.9      Ex:95m   x100   Datel:1.0010010
% 'E' 0.11120   47.3   29898.3      Ey:90m   x100   Datel:1.0007783
% EMSL13 8507310236-8509201833 5 020  MT#4  Mag:38 Tell:1329 Datel:MT-4
% 'H' 0.10003   48.5   0.0          Mag:0.1000060   Datel:1.0002222
% 'D' 0.09999   48.1   0.0          Mag:0.0998861   Datel:1.0010010
% 'Z' 0.09964   46.4   0.0          Mag:0.0999780   Datel:1.0010010
% 'N' 0.10537   46.7   29355.9      Ex:95m   x100   Datel:1.0010010
% 'E' 0.11120   47.3   29898.3      Ey:90m   x100   Datel:1.0007783

    
time_vec = [(20:20:3600)./(24*3600)]';% the data are strored in 180 records at 20 sec
fname  = 'E:\NoBackup\magtrans\EMSLAB\emsl13.asc';
fid = fopen(fname,'rt');
st=1;
en=180;
while feof(fid) ~= 1,
    
    A = fscanf(fid,'%s',1);
    Data = fscanf(fid,'%5d',180*5);
    emsl13.matrix(st:en,:) = reshape(Data,[5,180])'./10;
    start_time = datenum(A(7:end),'yymmddHHMM');
    emsl13.fday(st:en,:) = time_vec + start_time;
    
    st = en + 1;
    en = en + 180;
    
end;
   
fclose(fid);
emsl13.calib = [48.5 48.1 46.4  46.7 47.3];



%%
%Site MF1.01 (EMSL01); Drat Creek     44 54.2N  123 55.1W   (10.6 km from coast)
% ===============================================================================
%  
% Site located in a wood with head buried well and system box well shaded.
% Unfortunately there was a small prking area nearby (within 100 m) so that
% there may be very occassional noise on the magnetic channels due to traffic
% 18 July - 22 Sept continuous.
% Data of generally high quality with few problems, occassional offsets (See
% EMSL02).
%  
% The following list gives on the first record:-
% (a) the station (EMSL01)
% (b) the time interval for which these calibration settings and filter -3dB
%     points are valid (8507072345-8507180115)
% (c) the number of channels (5)
% (d) the MT system used (MT#9),
% (e) the magnetometer used (31)
% (f) the tellurometer used (0841)
% (g) the Datel used (1029)
% followed by five records, one for each component, giving:-
% (a) the component name
% (b) the calibration factor (NOTE: do not use as this data is in field values)
% (c) the LoPass -3dB point
% (d) the HiPass -3dB point (NOTE: no HiPass filters on magnetic channels)
% (e1) the magnetometer calibration factor, or
% (e2) the dipole length followed by the gain factor on the tellurometer
% (f) the Datel calibration factor
%  
% EMSL01 8507072345-8507180115 5 020   MT#9  Mag:31 Tell:0841 Datel:1029
% 'H' 0.099906  42.8   0.0          Mag:0.0999360   Datel:0.9997779
% 'D' 0.100004  46.6   0.0          Mag:0.0999940   Datel:1.0005559
% 'Z' 0.100021  43.1   0.0          Mag:0.1000010   Datel:1.0001111
% 'N' 18.1745   45.9   31027.1      Ex:55m   x1     Datel:0.9997779
% 'E' 15.3892   40.6   30840.7      Ey:65m   x1     Datel:1.0003334
% EMSL01 8507180116-8508132239 5 020   MT#9  Mag:31 Tell:0841 Datel:1029
% 'H' 0.099906  42.8   0.0          Mag:0.0999360   Datel:0.9997779
% 'D' 0.100004  46.6   0.0          Mag:0.0999940   Datel:1.0005559
% 'Z' 0.100021  43.1   0.0          Mag:0.1000010   Datel:1.0001111
% 'N' 0.181745  45.9   31027.1      Ex:55m   x100   Datel:0.9997779
% 'E' 0.153892  40.6   30840.7      Ey:65m   x100   Datel:1.0003334
% EMSL01 8508132240-8508202238 5 020   MT#9  Mag:31 Tell:0841 Datel:1029
% 'H' 0.099906  42.8   0.0          Mag:0.0999360   Datel:0.9997779
% 'D' 0.100004  46.6   0.0          Mag:0.0999940   Datel:1.0005559
% 'Z' 0.100021  43.1   0.0          Mag:0.1000010   Datel:1.0001111
% 'N' 0.363490  45.9   31027.1      Ex:55m   x50    Datel:0.9997779
% 'E' 0.307784  40.6   30840.7      Ey:65m   x50    Datel:1.0003334
% EMSL01 8508202239-8509222203 5 020   MT#9  Mag:31 Tell:0841 Datel:1029
% 'H' 0.099906  42.8   0.0          Mag:0.0999360   Datel:0.9997779
% 'D' 0.100004  46.6   0.0          Mag:0.0999940   Datel:1.0005559
% 'Z' 0.100021  43.1   0.0          Mag:0.1000010   Datel:1.0001111
% 'N' 0.181745  45.9   31027.1      Ex:55m   x100   Datel:0.9997779
% 'E' 0.153892  40.6   30840.7      Ey:65m   x100   Datel:1.0003334

    
time_vec = [(20:20:3600)./(24*3600)]';% the data are strored in 180 records at 20 sec
fname  = 'E:\NoBackup\magtrans\EMSLAB\emsl01.asc';
fid = fopen(fname,'rt');
st=1;
en=180;
while feof(fid) ~= 1,
    
    A = fscanf(fid,'%s',1);
    Data = fscanf(fid,'%5d',180*5);
    emsl01.matrix(st:en,:) = reshape(Data,[5,180])'./10;
    start_time = datenum(A(7:end),'yymmddHHMM');
    emsl01.fday(st:en,:) = time_vec + start_time;
    
    st = en + 1;
    en = en + 180;
    
end;
   
fclose(fid);
% emsl01.calib = [48.5 48.1 46.4  46.7 47.3];



